1. Field of the Invention
The present invention relates to disk drives. More particularly, the present invention relates to a disk drive executing part of a linked disk command.
2. Description of the Prior Art
FIG. 1A shows a prior art disk drive 2 comprising a disk 4 having a plurality of concentric tracks 6. Each track 6 is partitioned into a number of data sectors for storing user data. A head 8 is connected to a distal end of an actuator arm 10 which is rotated about a pivot in order to actuate the head 8 radially over the disk 4. The disk 4 further comprises a plurality of embedded servo sectors 12 processed to maintain the head 8 over the centerline of a target track during read and write operations.
A disk controller 14 controls the operation of the disk drive 2 by executing read and write commands received from a host computer. Commands received from the host are converted into disk commands (read/write commands) that are inserted into an input/output (I/O) queue and executed according to a rotational position optimization (RPO) algorithm. The RPO algorithm is used by the disk controller 14 to select the disk commands from the I/O queue in an order that optimizes performance with respect to the mechanical latencies of the disk drive, including the seek latency of the head 8 and the rotational latency of the disk 4.
FIG. 1B shows a flow diagram of the steps executed by the disk controller 14 while executing a disk command. At step 16, a disk command is selected from the I/O queue according to the RPO algorithm (as determined from the current radial and circumferential location of the head 8 and other commands in the I/O queue). At step 18, the disk controller 14 seeks the head 8 to a target track comprising target data sectors to be read/written. Ideally the head 8 will reach the target track at the end of a seek immediately preceding the first target data sector in order to minimize the rotational latency while waiting for the first target data sector to reach the head 8. However, due to various system dynamics the seek may be delayed causing the head 8 to reach the target track after the head 8 as already passed the first target data sector. If at step 20 the head 8 has missed the first target data sector (identified by START in FIG. 1A), then at step 22 the disk drive waits for the disk 4 to rotate until the head 8 is positioned over the first target data sector and then at step 24 reads/writes the data from/to the target data sectors (from START to STOP in FIG. 1A). Waiting for the disk to complete a revolution when the first target data sector is missed is undesirable since it increase the average access time of the disk drive. The RPO algorithm may be implemented with conservative seek time estimates to ensure the head 8 arrives at the target track ahead of the first target data sector, but this reduces the benefit derived from the RPO algorithm.
U.S. Pat. No. 5,991,825 discloses a disk drive which avoids missing a revolution when the first target data sector is missed by performing a secondary disk command in place of the current disk command. An RPO algorithm is executed to select a primary disk command from an I/O queue as well as a secondary disk command. A seek is then performed to the target data sector of the primary disk command, and if the head arrives late so that the first target data sector is missed, a seek is performed to the target data sector of the secondary disk command. In this manner the RPO algorithm can be implemented with more aggressive seek time estimates to minimize the rotational latency once the head reaches the target track. However, whenever the first target data sector of the primary disk command is missed and the secondary disk command executed, the latency in seeking to the primary disk command degrades performance.
Referring again to FIG. 1B, while executing the disk command at step 24 an error may occur (such as a physical shock to the disk drive) which causes the disk command to abort at step 25. If this happens control branches to step 22 where the disk drive again waits for the disk 4 to rotate to position the head 8 over the first target data sector and at step 24 re-executes the disk command. Again, waiting for the disk 4 to complete a revolution is undesirable since it increase the average access time of the disk drive.
There is, therefore, a need for a disk drive which improve performance when a first target data sector of a disk command is missed or when a disk command is aborted.